<!DOCTYPE html>
<html>
<head>
	<meta charset="utf8">
	<title>播放台| 远程播放RemotePlayer</title>
	<link rel="stylesheet" href="css/stylesheets/style.css">
	<script src="http://libs.useso.com/js/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
	<div id="background"></div>
	<div id="player">
		<div class="cover"></div>
		<div class="ctrl">
			<div class="tag">
				<strong>Title</strong>
				<span class="artist">Artist</span>
				<span class="album">Album</span>
			</div>
			<div class="control">
				<div class="left">
					<div class="rewind icon"></div>
					<div class="playback icon"></div>
					<div class="fastforward icon"></div>
				</div>
				<div class="volume right">
					<div class="mute icon left"></div>
					<div class="slider left">
						<div class="pace"></div>
					</div>
				</div>
			</div>
			<div class="progress">
				<div class="slider">
					<div class="loaded"></div>
					<div class="pace"></div>
				</div>
				<div class="timer left">0:00</div>
				<div class="right">
					<div class="repeat icon"></div>
					<div class="shuffle icon"></div>
				</div>
			</div>
		</div>
	</div>
	<ul id="playlist"></ul>
	<div id="ClientId"><span id="hint">播放台编号</span><br><span id="cid"></span></div>
	<footer>
		『 Cover Art 』 Orginial Copyright &copy; 2012 <a href="http://zespia.tw" target="_blank">SkyArrow</a> &nbsp;&nbsp;
		Modify By &copy; 2015 <a href="http://cdog.me" target="_blank">CDog</a>
	</footer>
	<script src="js/jquery-ui-1.8.17.custom.min.js"></script>
	<script src="js/script.js"></script>
	<script src="/socket.io/socket.io.js"></script>
	<script>
	
	$(function(){
		  socket = io();
		  socket.on("NewClient",function(info){
		  	$("#cid").html(info.id);
		  	synclist();
		  });
		  socket.on("Play/PauseSignal",function(){
		  	if (!first){
		  	$(".playback").click();
		  	}

		  });
		  socket.on("NextSignal",function(){
		  	if (!first) {$(".fastforward").click();}

		  });
		  socket.on("PrevSignal",function(){
		  	if (!first) {$(".rewind").click();}

		  });
		  socket.on("AddSong",function(song){
		  	addSong(song);

		  });
		  socket.on("VolupSignal",function(){
		  	chgVolume(true);

		  });
		  socket.on("VoldownSignal",function(){
			chgVolume(false);
		  });
		  socket.on("DelastSignal",function(){
			delastsong();
		  });

		  


		  /*function getbgimg(){
		  	$.ajax({
				type: "get",
				url: "https://api.desktoppr.co/1/wallpapers",
				dataType:"json",
				success: function(json){
					$("body").css({background:"url('"+json.response[Math.floor(Math.random()*20)].image.url+"')"});
				}
			});
		  }
		  getbgimg();*/

		  
});

	</script>
</body>
</html>